import {config} from "dotenv";
import {ConfigInterface} from "@/interface/configInterface";
import {Dialect} from "sequelize";
config({path: `.env.${process.env.NODE_ENV}`})
const {
    PORT,
    DB_HOST,
    DB_PORT,
    DB_USER,
    DB_PASSWORD,
    DB_DATABASE,
    DB_DIALECT
} = process.env
const configData: ConfigInterface = {
    port: PORT as any,
    db:{
        host:DB_HOST as string,
        port: DB_PORT as any,
        user:DB_USER as string,
        password:DB_PASSWORD as string,
        database:DB_DATABASE as string,
        dialect: DB_DIALECT as Dialect
    }
}
export default configData